package com.gopay.cashier.domain.bean;

import java.util.ArrayList;
import java.util.List;

import com.gopay.common.domain.BaseEntity;

/**
 * 封装 支付渠道/权限 供页面使用。
 * 
 * 收银台只有收款类交易，这里的权限都是指收款方acctId对应的权限。
 * 
 * @PayWayBean.java
 * @author zhanglei
 * @2012-12-28 下午2:10:13 www.gopay.com.cn Inc.All rights reserved.
 */
public class PayWayBean extends BaseEntity {
    private static final long serialVersionUID = 2827696443079398737L;
    private String email;
    /** 是否有虚拟卡支付权限 */
    private boolean acctPay;
    /** 是否有银行卡支付权限 */
    private boolean bankPay;
    /** 是否有信用卡无卡支付权限 */
    private boolean ccrdPay;
    /** 是否有快捷支付权限 */
    private boolean fastPay;

    /** 是否可以使用企业银行支付 */
    // 以下两个默认为true，因为目前只有充值交易的企业用户才禁止使用个人银行支付，需特殊处理
    private boolean entprBank = true;
    /** 是否可以使用个人银行支付 */
    private boolean indivBank = true;

    /** 虚拟卡支付tab页序号 */
    private int acctPayIndex = -1;
    /** 银行卡支付tab页序号 */
    private int bankPayIndex = -1;
    /** 信用卡无卡支付tab页序号 */
    private int ccrdPayIndex = -1;
    /** 快捷支付tab页序号 */
    private int fastPayIndex = -1;

    /** 虚拟卡支付tab页标题 */
    private String acctPayName;
    /** 银行卡支付tab页标题 */
    private String bankPayName;
    /** 信用卡无卡支付tab页标题 */
    private String ccrdPayName;
    /** 快捷支付tab页序号 */
    private String fastPayName;

    /** 默认用户类型：01-个人，02-企业 */
    private String defalutPayUserType;

    /** 个人银行卡 支持的银行列表 ，如[BOC,ICBC] */
    private List<String> bankPayIndivBanks = new ArrayList<String>();
    /** 企业银行卡 支持的银行列表 ，如[BOC,ICBC] */
    private List<String> bankPayEntprBanks = new ArrayList<String>();

    public boolean hasPayWay() {
        // 只要有一个渠道的权限就要展现收银台的标签页。
        return acctPay || bankPay || ccrdPay || fastPay;
    }

    public boolean isBankPay() {
        return bankPay;
    }

    public void setBankPay(boolean bankPay) {
        this.bankPay = bankPay;
    }

    public List<String> getBankPayIndivBanks() {
        return bankPayIndivBanks;
    }

    public void addBankPayIndivBank(String bankPayIndivBank) {
        this.bankPayIndivBanks.add(bankPayIndivBank);
    }

    public List<String> getBankPayEntprBanks() {
        return bankPayEntprBanks;
    }

    public void addBankPayEntprBank(String bankPayEntprBank) {
        this.bankPayEntprBanks.add(bankPayEntprBank);
    }

    public boolean isAcctPay() {
        return acctPay;
    }

    public void setAcctPay(boolean acctPay) {
        this.acctPay = acctPay;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public boolean isCcrdPay() {
        return ccrdPay;
    }

    public void setCcrdPay(boolean ccrdPay) {
        this.ccrdPay = ccrdPay;
    }

    public boolean isFastPay() {
        return fastPay;
    }

    public void setFastPay(boolean fastPay) {
        this.fastPay = fastPay;
    }

    public int getAcctPayIndex() {
        return acctPayIndex;
    }

    public void setAcctPayIndex(int acctPayIndex) {
        this.acctPayIndex = acctPayIndex;
    }

    public int getBankPayIndex() {
        return bankPayIndex;
    }

    public void setBankPayIndex(int bankPayIndex) {
        this.bankPayIndex = bankPayIndex;
    }

    public int getCcrdPayIndex() {
        return ccrdPayIndex;
    }

    public void setCcrdPayIndex(int ccrdPayIndex) {
        this.ccrdPayIndex = ccrdPayIndex;
    }

    public int getFastPayIndex() {
        return fastPayIndex;
    }

    public void setFastPayIndex(int fastPayIndex) {
        this.fastPayIndex = fastPayIndex;
    }

    public String getDefalutPayUserType() {
        return defalutPayUserType;
    }

    public void setDefalutPayUserType(String defalutPayUserType) {
        this.defalutPayUserType = defalutPayUserType;
    }

    public String getAcctPayName() {
        return acctPayName;
    }

    public void setAcctPayName(String acctPayName) {
        this.acctPayName = acctPayName;
    }

    public String getBankPayName() {
        return bankPayName;
    }

    public void setBankPayName(String bankPayName) {
        this.bankPayName = bankPayName;
    }

    public String getCcrdPayName() {
        return ccrdPayName;
    }

    public void setCcrdPayName(String ccrdPayName) {
        this.ccrdPayName = ccrdPayName;
    }

    public String getFastPayName() {
        return fastPayName;
    }

    public void setFastPayName(String fastPayName) {
        this.fastPayName = fastPayName;
    }

    public boolean isEntprBank() {
        return entprBank;
    }

    public void setEntprBank(boolean entprBank) {
        this.entprBank = entprBank;
    }

    public boolean isIndivBank() {
        return indivBank;
    }

    public void setIndivBank(boolean indivBank) {
        this.indivBank = indivBank;
    }

}
